﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Manage.aspx.cs" Inherits="WinnerCMS.WebUI.Admin.Role.Manage" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>角色管理</title>
    <%: Styles.Render("~/Content/Bootstrap/css") %>
    <%: Scripts.Render("~/Scripts/AdminBase") %>
    <script>
        $(function() {
            $(".showCategoryPermission").click(function () {
                var roleid = $(this).data("roleid");
                $.jqopen("../Class/Permission.aspx?RoleId=" + roleid, { title: "栏目权限", width: 500, height: 680 });
            });
            
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
   <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
            OnRowDeleting="GV_List_RowDeleting" GridLines="None" CssClass="table table-bordered table-condensed table-hover">
            <Columns>
                <asp:BoundField HeaderText="ID" DataField="ID">
                    <ItemStyle Width="50px" HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="角色名称" DataField="RoleName">
                    <ItemStyle Width="150px" HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="备注" DataField="Remark" />
                <asp:TemplateField>
                    <ItemTemplate><a id="<%# Eval("ID") %>" class="showCategoryPermission" data-roleid="<%# Eval("ID") %>">栏目权限</a></ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="查看权限">
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("ID", "Add.aspx?Action=ReadOnly&amp;ID={0}") %>'><img src="../Images/Power.gif" alt="" /></asp:HyperLink>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="修改权限">
                    <ItemTemplate>
                        <asp:HyperLink ID="HL_Edit" runat="server" NavigateUrl='<%# Eval("ID", "Add.aspx?Action=Edit&ID={0}") %>'><img src="../Images/Edit.gif" alt="" /></asp:HyperLink>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                </asp:TemplateField>

                <asp:TemplateField HeaderText="删除角色" ShowHeader="False">
                    <ItemTemplate>
                        <asp:ImageButton ID="IB_Delete" runat="server" CausesValidation="False" OnClientClick="if(confirm('您真的要删除吗？属于该角色的管理员要一起删掉的哦！')==false){ return false;}"
                            CommandName="Delete" ImageUrl="~/Admin/Images/Del.gif" Text="删除" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="HeaderStyle" />
        </asp:GridView>
    </form>
</body>
</html>
